<template>
  <!-- 添加顶部菜单 -->
   <topNar/>
  <div class="app-container">
 
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="128px">
      <el-form-item label="教师姓名" prop="teacherName">
        <el-input
          v-model="queryParams.teacherName"
          placeholder="请输入教师姓名"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学院/院系" prop="teacherDeptName">
        <el-input
          v-model="queryParams.teacherDeptName"
          placeholder="请输入学院/院系"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="毕业院校及国家" prop="teacherGraduated">
        <el-input
          v-model="queryParams.teacherGraduated"
          placeholder="请输入毕业院校及国家"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="教师邮箱" prop="teacherEmail">
        <el-input
          v-model="queryParams.teacherEmail"
          placeholder="请输入教师邮箱"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <!-- 卡片式布局替代表格 -->
    <el-row v-loading="loading" :gutter="20">
      <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" v-for="(item, index) in teacherInfoList" :key="index" class="mb20">
        <el-card class="teacher-card" :body-style="{ padding: '0px' }" shadow="hover">
          <!-- <div class="teacher-card-header">
            <el-checkbox v-model="item.selected" @change="(val) => handleSelect(item, val)" />
            <span class="teacher-id">{{ item.teacherId }}</span>
          </div> -->
          <div class="teacher-image">
            <image-preview :src="item.teacherImg" :width="120" :height="120" class="teacher-avatar" />
          </div>
          <div class="teacher-info">
            <h3 class="teacher-name">{{ item.teacherName }}</h3>
            <p class="teacher-dept">{{ item.teacherDeptName }}</p>
            <p class="teacher-school">{{ item.teacherGraduated }}</p>
            <p class="teacher-research">研究方向：{{ item.teacherInterested }}</p>
            <p class="teacher-email">
              <el-icon><Message /></el-icon>
              {{ item.teacherEmail }}
            </p>
          </div>
          <!-- <div class="teacher-actions">
            <el-button link type="primary" icon="Edit" @click="handleUpdate(item)" v-hasPermi="['teacherInfo:teacherInfo:edit']">修改</el-button>
            <el-button link type="primary" icon="Delete" @click="handleDelete(item)" v-hasPermi="['teacherInfo:teacherInfo:remove']">删除</el-button>
          </div> -->
        </el-card>
      </el-col>
    </el-row>
    
    <!-- <pagination
      v-show="total>0"
      :total="total"
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      @pagination="getList"
    /> -->
  <div class="pagination-wrapper" v-show="total > 0">
    <el-pagination
      v-model:current-page="queryParams.pageNum"
      v-model:page-size="queryParams.pageSize"
      :page-sizes="[12, 24, 36, 48]"
      :total="total"
      :background="true"
      layout="total, sizes, prev, pager, next, jumper"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>

    <!-- 添加或修改教师信息对话框 -->
    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
      <el-form ref="teacherInfoRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="教师姓名" prop="teacherName">
          <el-input v-model="form.teacherName" placeholder="请输入教师姓名" />
        </el-form-item>
        <el-form-item label="学院/院系" prop="teacherDeptName">
          <el-input v-model="form.teacherDeptName" placeholder="请输入学院/院系" />
        </el-form-item>
        <el-form-item label="毕业院校及国家" prop="teacherGraduated">
          <el-input v-model="form.teacherGraduated" placeholder="请输入毕业院校及国家" />
        </el-form-item>
        <el-form-item label="教师研究方向" prop="teacherInterested">
          <el-input v-model="form.teacherInterested" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="教师邮箱" prop="teacherEmail">
          <el-input v-model="form.teacherEmail" placeholder="请输入教师邮箱" />
        </el-form-item>
        <el-form-item label="教师照片" prop="teacherImg">
          <image-upload v-model="form.teacherImg"/>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
    <router-view />
</template>

<script setup name="TeacherInfo">
import { listTeacherInfo, getTeacherInfo, delTeacherInfo, addTeacherInfo, updateTeacherInfo } from "@/api/teacherInfo/teacherInfo";
import { Message } from '@element-plus/icons-vue';
import topNar from "./compoents/topNar.vue";
//引入路由
const { proxy } = getCurrentInstance();
const teacherInfoList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");

const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    teacherName: null,
    teacherDeptName: null,
    teacherGraduated: null,
    teacherInterested: null,
    teacherEmail: null,
  },
  rules: {
  }
});

const { queryParams, form, rules } = toRefs(data);
// 添加分页相关方法
const handleSizeChange = (val) => {
  queryParams.value.pageSize = val;
  getList();
};

const handleCurrentChange = (val) => {
  queryParams.value.pageNum = val;
  getList();
};



/** 查询教师信息列表 */
function getList() {
  loading.value = true;
  listTeacherInfo(queryParams.value).then(response => {
    teacherInfoList.value = response.rows.map(item => ({
      ...item,
      selected: false
    }));
    total.value = response.total;
    loading.value = false;
  });
}

// 处理选择
function handleSelect(item, val) {
  // 更新选中状态
  const selectedItems = teacherInfoList.value.filter(i => i.selected);
  ids.value = selectedItems.map(item => item.teacherId);
  single.value = selectedItems.length != 1;
  multiple.value = !selectedItems.length;
}

// 取消按钮
function cancel() {
  open.value = false;
  reset();
}

// 表单重置
function reset() {
  form.value = {
    teacherId: null,
    teacherName: null,
    teacherDeptName: null,
    teacherGraduated: null,
    teacherInterested: null,
    teacherEmail: null,
    teacherImg: null,
    userId: null,
    deptId: null,
    createBy: null,
    createTime: null,
    updateBy: null,
    updateTime: null,
    remark: null
  };
  proxy.resetForm("teacherInfoRef");
}

/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}

/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}

// 多选框选中数据
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.teacherId);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}

/** 新增按钮操作 */
function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加教师信息";
}

/** 修改按钮操作 */
function handleUpdate(row) {
  reset();
  const _teacherId = row.teacherId || ids.value
  getTeacherInfo(_teacherId).then(response => {
    form.value = response.data;
    open.value = true;
    title.value = "修改教师信息";
  });
}

/** 提交按钮 */
function submitForm() {
  proxy.$refs["teacherInfoRef"].validate(valid => {
    if (valid) {
      if (form.value.teacherId != null) {
        updateTeacherInfo(form.value).then(response => {
          proxy.$modal.msgSuccess("修改成功");
          open.value = false;
          getList();
        });
      } else {
        addTeacherInfo(form.value).then(response => {
          proxy.$modal.msgSuccess("新增成功");
          open.value = false;
          getList();
        });
      }
    }
  });
}

/** 删除按钮操作 */
function handleDelete(row) {
  const _teacherIds = row.teacherId || ids.value;
  proxy.$modal.confirm('是否确认删除教师信息编号为"' + _teacherIds + '"的数据项？').then(function() {
    return delTeacherInfo(_teacherIds);
  }).then(() => {
    getList();
    proxy.$modal.msgSuccess("删除成功");
  }).catch(() => {});
}

/** 导出按钮操作 */
function handleExport() {
  proxy.download('teacherInfo/teacherInfo/export', {
    ...queryParams.value
  }, `teacherInfo_${new Date().getTime()}.xlsx`)
}

getList();
</script>

<style scoped>
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 32px;
  margin-right: 12px;
}

.system-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.nav-menu {
  border-bottom: none;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-dropdown {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.username {
  margin: 0 8px;
  font-size: 14px;
  color: #333;
}
.pagination-wrapper {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* 分页器主体样式 - 与搜索表单保持一致的玻璃态效果 */
.pagination-wrapper :deep(.el-pagination) {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 16px 24px;
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.37),
    0 8px 32px rgba(31, 38, 135, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 统一所有分页按钮的基础样式 */
.pagination-wrapper :deep(.el-pagination.is-background .btn-prev),
.pagination-wrapper :deep(.el-pagination.is-background .btn-next),
.pagination-wrapper :deep(.el-pagination.is-background .el-pager li) {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.5);
  border-radius: 10px;
  color: #4b5563;
  font-weight: 500;
  margin: 0 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 按钮悬停效果 - 与主题按钮风格一致 */
.pagination-wrapper :deep(.el-pagination.is-background .btn-prev:not(.is-disabled):hover),
.pagination-wrapper :deep(.el-pagination.is-background .btn-next:not(.is-disabled):hover),
.pagination-wrapper :deep(.el-pagination.is-background .el-pager li:not(.is-active):not(.is-disabled):hover) {
  background-color: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
  color: #667eea;
  transform: translateY(-1px);
}

/* 当前页样式 - 使用主题渐变色 */
.pagination-wrapper :deep(.el-pagination.is-background .el-pager li.is-active) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
  font-weight: 600;
}

.pagination-wrapper :deep(.el-pagination.is-background .el-pager li.is-active:hover) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 禁用状态 */
.pagination-wrapper :deep(.el-pagination.is-background .btn-prev.is-disabled),
.pagination-wrapper :deep(.el-pagination.is-background .btn-next.is-disabled) {
  background-color: rgba(243, 244, 246, 0.5);
  border-color: rgba(229, 231, 235, 0.3);
  color: #d1d5db;
  cursor: not-allowed;
}

/* 省略号样式 */
.pagination-wrapper :deep(.el-pager li.more) {
  background-color: transparent;
  border: none;
  color: #9ca3af;
}

/* 总数文字 */
.pagination-wrapper :deep(.el-pagination__total) {
  color: #374151;
  font-weight: 500;
  margin-right: 12px;
}

/* 每页显示选择器 - 与表单输入框风格一致 */
.pagination-wrapper :deep(.el-pagination__sizes .el-select .el-select__wrapper) {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-wrapper :deep(.el-pagination__sizes .el-select .el-select__wrapper:hover) {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pagination-wrapper :deep(.el-pagination__sizes .el-select .el-select__wrapper.is-focus) {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 页码跳转输入框 - 与表单输入框风格一致 */
.pagination-wrapper :deep(.el-pagination__jump .el-input__wrapper) {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-wrapper :deep(.el-pagination__jump .el-input__wrapper:hover) {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pagination-wrapper :deep(.el-pagination__jump .el-input__wrapper.is-focus) {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 分页器文字颜色 */
.pagination-wrapper :deep(.el-pagination__sizes-label),
.pagination-wrapper :deep(.el-pagination__jump-label) {
  color: #4b5563;
  font-weight: 500;
}

/* 响应式布局 */
@media (max-width: 1024px) {
  .pagination-wrapper :deep(.el-pagination) {
    padding: 14px 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* 中等屏幕隐藏跳转功能 */
  .pagination-wrapper :deep(.el-pagination__jump) {
    display: none;
  }
}

@media (max-width: 768px) {
  .pagination-wrapper {
    margin-top: 24px;
    padding: 0 16px;
  }
  
  .pagination-wrapper :deep(.el-pagination) {
    padding: 12px 16px;
    border-radius: 16px;
  }
  
  /* 小屏幕只保留基本分页功能 */
  .pagination-wrapper :deep(.el-pagination__sizes),
  .pagination-wrapper :deep(.el-pagination__jump) {
    display: none;
  }
  
  .pagination-wrapper :deep(.el-pagination__total) {
    display: none;
  }
  
  .pagination-wrapper :deep(.el-pagination.is-background .btn-prev),
  .pagination-wrapper :deep(.el-pagination.is-background .btn-next),
  .pagination-wrapper :deep(.el-pagination.is-background .el-pager li) {
    padding: 0 8px;
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .pagination-wrapper {
    padding: 0 12px;
  }
  
  .pagination-wrapper :deep(.el-pagination) {
    padding: 10px 12px;
  }
  
  .pagination-wrapper :deep(.el-pagination.is-background .btn-prev),
  .pagination-wrapper :deep(.el-pagination.is-background .btn-next),
  .pagination-wrapper :deep(.el-pagination.is-background .el-pager li) {
    padding: 0 6px;
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    margin: 0 2px;
    border-radius: 8px;
    font-size: 12px;
  }
  
  /* 极小屏幕减少显示的页码数量 */
  .pagination-wrapper :deep(.el-pager li:nth-child(n+5)) {
    display: none;
  }
  
  .pagination-wrapper :deep(.el-pager li.is-active) {
    display: flex !important;
  }
}

/* 添加淡入动画 */
.pagination-wrapper {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 现代化渐变背景 */
.app-container {
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  background:url('@/assets/images/bg1.jpeg') no-repeat center center;
  min-height: calc(100vh - 84px);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.app-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 118, 117, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* 搜索表单现代化样式 */
.el-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.37),
    0 8px 32px rgba(31, 38, 135, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 1;
}

/* 表单项样式优化 */
.el-form-item {
  margin-bottom: 20px;
}

.el-form-item :deep(.el-form-item__label) {
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.el-form-item :deep(.el-input__wrapper) {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(209, 213, 219, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.el-form-item :deep(.el-input__wrapper):hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.el-form-item :deep(.el-input__wrapper.is-focus) {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* 按钮现代化样式 */
.el-button {
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.el-button--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.el-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

.el-button--primary:active {
  transform: translateY(0);
}

.el-button:not(.el-button--primary) {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.8);
  color: #374151;
}

.el-button:not(.el-button--primary):hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 卡片网格优化 */
.mb20 {
  margin-bottom: 24px;
}

.teacher-card {
  border-radius: 20px;
  border: none;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.08),
    0 20px 48px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
}

.teacher-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 300% 100%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.teacher-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 32px 64px rgba(0, 0, 0, 0.08);
}

/* 卡片头部样式 */
.teacher-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.teacher-id {
  font-size: 10px;
  color: #6b7280;
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  padding: 3px 8px;
  border-radius: 10px;
}

/* 复选框样式优化 */
.el-checkbox :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
}

/* 教师头像区域 */
.teacher-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.05) 0%, 
    rgba(118, 75, 162, 0.05) 50%,
    rgba(240, 147, 251, 0.05) 100%);
  position: relative;
}

.teacher-image::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #667eea20, #764ba220);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.teacher-avatar {
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  object-fit: cover;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.teacher-card:hover .teacher-avatar {
  transform: scale(1.05);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* 教师信息区域 */
.teacher-info {
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.98);
}

.teacher-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1f2937;
  text-align: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.teacher-dept {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  text-align: center;
  margin: 0 0 12px 0;
  padding: 4px 12px;
  background: rgba(102, 126, 234, 0.08);
  border-radius: 16px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.teacher-school {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 16px 0;
  line-height: 1.5;
  opacity: 0.8;
}

.teacher-research {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  margin: 16px 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
  border-radius: 12px;
  border-left: 3px solid #667eea;
}

.teacher-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #667eea;
  font-weight: 500;
  margin: 16px 0 0 0;
  padding: 8px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.teacher-email:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.teacher-email .el-icon {
  color: #667eea;
}

/* 操作按钮区域 */
.teacher-actions {
  padding: 16px 20px;
  background: rgba(248, 250, 252, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: center;
  gap: 16px;
}

.teacher-actions .el-button {
  border-radius: 20px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  max-width: 120px;
}

.teacher-actions .el-button--primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
}

.teacher-actions .el-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.teacher-actions .el-button:not(.el-button--primary) {
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

.teacher-actions .el-button:not(.el-button--primary):hover {
  background: rgba(102, 126, 234, 0.08);
  border-color: #667eea;
  transform: translateY(-1px);
}

/* 分页样式优化 */
.pagination-section {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

:deep(.el-pagination) {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

:deep(.el-pagination .el-pager li) {
  border-radius: 8px;
  margin: 0 2px;
  transition: all 0.3s ease;
}

:deep(.el-pagination .el-pager li.is-active) {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

/* 对话框样式优化 */
:deep(.el-dialog) {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 12px 100px rgba(0, 0, 0, 0.1);
}

:deep(.el-dialog__header) {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 24px 32px;
  margin: 0;
}

:deep(.el-dialog__title) {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

:deep(.el-dialog__headerbtn .el-dialog__close) {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
}

:deep(.el-dialog__headerbtn .el-dialog__close):hover {
  color: white;
}

:deep(.el-dialog__body) {
  padding: 32px;
  background: rgba(255, 255, 255, 0.98);
}

:deep(.el-dialog__footer) {
  background: rgba(248, 250, 252, 0.8);
  padding: 20px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* 加载状态优化 */
:deep(.el-loading-mask) {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

:deep(.el-loading-spinner) {
  color: #667eea;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .app-container {
    padding: 16px;
  }
  
  .el-form {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .teacher-card {
    margin-bottom: 20px;
  }
  
  .teacher-info {
    padding: 20px 16px;
  }
  
  .teacher-name {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .el-form-item {
    margin-bottom: 16px;
  }
  
  .el-form-item :deep(.el-form-item__label) {
    font-size: 13px;
  }
  
  .teacher-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .teacher-actions .el-button {
    width: 100%;
  }
}

/* 动画效果 */
.teacher-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.teacher-card:nth-child(1) { animation-delay: 0.1s; }
.teacher-card:nth-child(2) { animation-delay: 0.2s; }
.teacher-card:nth-child(3) { animation-delay: 0.3s; }
.teacher-card:nth-child(4) { animation-delay: 0.4s; }
.teacher-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 毛玻璃效果增强 */
.el-form,
:deep(.el-pagination) {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
}
</style>